﻿@model IEnumerable<LibMS.Models.LibCategories>
@{
    ViewBag.Title = "Danh mục tài liệu";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<!-- Page info-->
<div class="well well-sm">
    <h4 class="text-success">Danh mục tài liệu</h4>
</div>
<!-- /. End Page info-->
<div class="row">
    <!-- Document item-->
    <div class="col-lg-8">
        @if (Convert.ToBoolean(ViewData["success"]) == true)
        {
            <div id="categoryItems">
                <div class="panel panel-default">
                    <div class="panel-body">
                        @for (int i = 0; i < Model.ToArray().Length; i++)
                        {
                            <div id="@Model.ToArray()[i].CategoryId" class="panel panel-default">
                                <div class="panel-heading"><h3 class="panel-title"><strong>@(i + 1 + ". " + Model.ToArray()[i].CategoryName)</strong></h3></div>
                                <input type="hidden" value="@Model.ToArray()[i].CategoryId" />
                                <div class="panel-body">
                                    <div class="media">
                                        <a class="pull-left" href="#">
                                            <img class="media-object" alt="40x44" style="width: 40px; height: 50px;" src="../../Contents/Image/thumbnail-none.gif">
                                        </a>
                                        <div class="media-body">
                                            <h4 class="media-heading">Windows Presentation Foundation Unleashed</h4>
                                        </div>
                                    </div>
                                    <hr />
                                    <p>Tài liệu cùng danh mục:</p>
                                    <ul>

                                    </ul>
                                    <a class="pull-right" href="/documents/category/@Model.ToArray()[i].CategoryId"><strong>Xem chi tiết ...</strong></a>
                                </div>
                            </div>
                        }
                    </div>
                </div>

            </div>
        }
        else
        {

        }
    </div>
    <!-- /.End Document item-->
    <!-- Right menu-->
    <div class="col-lg-4">
        <div id="rmDocumentsTopView" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><strong>Tài liệu đọc nhiều</strong></h3>
            </div>
            <div class="list-group">
            </div>
        </div>

        <div id="rmDocumentsTopNew" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><strong>Tài liệu mới đăng</strong></h3>
            </div>
            <div class="list-group">
            </div>
        </div>
    </div>
    <!-- /. Right menu-->
</div>

@section JS {
    <script src="~/Scripts/App/LibCategories/ListCategories.js"></script>
    <script type="text/javascript">
        var libCategories = new LibCategories();
        libCategories.Init();
    </script>
}
